Previous | Next

# Using a patch file

To apply an existing patch:

    patch < patchfile

If you get an error, might need:

    patch -p1 < patchfile

(or p0, p2 etc.) The number after the p is how many directories you are from where the patch was made.

If you're into genealogy, it's sort of like a great-aunt twice removed -- the p is the removed.

Usually if you have trouble applying a patch, you can ask someone involved in the project what -p number they normally use.